import type { RouteMatch, RouteObject } from 'react-router-dom';


export interface IRouteConventionExportProps {
  routeProps?: Record<string, any>;
}
export interface IRoute extends IRouteConventionExportProps {
  id: string;
  path?: string;
  index?: boolean;
  parentId?: string;
  redirect?: string;
  [key: string]: any;
}
export interface IClientRoute extends IRoute {
  element: React.ReactNode;
  children?: IClientRoute[];
  routes?: IClientRoute[];
}

export type ISelectedRoute = IRoute & RouteObject & {}

export interface ISelectedRoutes extends RouteMatch {
  route: ISelectedRoute;
}

export interface IRoutesById {
  [id: string]: IRoute;
}

export interface IRouteComponents {
  [id: string]: any;
}